//
//  MyHouseCell.m
//  YDD
//
//  Created by 欧洪飞 on 2017/8/22.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "MyHouseCell.h"

@implementation MyHouseCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)deleteButton:(UIButton *)sender {
    self.deleteActionButton(sender);
}

- (void)setMyHouseData:(NSDictionary *)dic{
    [self.labTit setText:[dic objectForKey:@"title"]];
    [self.labBQ setText:[dic objectForKey:@"community"]];
    [self.labHX setText:[dic objectForKey:@"room"]];
    [self.labRent setText:[dic objectForKey:@"mode"]];
    NSString *picString = [dic objectForKey:@"pic"];
    NSString *picimgUrl = @"";
    if (picString.length > 0) {
        NSArray *imageArray = [picString componentsSeparatedByString:@"|"];
        picimgUrl = [NSString stringWithFormat:@"%@%@",[user objectForKey:@"ImageUrl"],[imageArray firstObject]];
    }
    
    [self.images sd_setImageWithURL:[NSURL URLWithString:picimgUrl]];
    [self.labMoney setText:[NSString stringWithFormat:@"%@ 元/月",[dic objectForKey:@"mnthly"]]];
    [self.timeLabel setText:[NSString stringWithFormat:@"发布：%@",[dic objectForKey:@"rejecttime"]]];
}

- (IBAction)updatebutton:(UIButton *)sender {
    self.updateActionButton(sender);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
